/*!*********************************************************************************
 * X2Engine Open Source Edition is a customer relationship management program developed by
 * X2 Engine, Inc. Copyright (C) 2011-2019 X2 Engine Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY X2ENGINE, X2ENGINE DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact X2Engine, Inc. P.O. Box 610121, Redwood City,
 * California 94061, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2 Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2 Engine".
 **********************************************************************************/




@import "standards";
@import "colors";
@import "login-shared";

$loginText: #444343;
$loginTextFaded: #666;
$loginBoldText: rgb(104, 104, 104);
$defaultBgColor: $appBlue;

a.x2-button {
    padding: 5px 20px;
}

#password-reset-form-outer {
    .x2-button { 
        margin: auto;
        margin-top: 9px !important;
    }
    a.text-link, a.text-link:hover {
        color: $loginText !important;
    }
}

#login-form {
    a.text-link, a.text-link:hover {
        color: $loginText !important;
    }

    a, .remember-me-cell label {
        opacity: 0.7;
    }

    .login-logo-link {
        opacity: 1;
    }

    a:hover {
        opacity: 1;
    }

    * {
        box-sizing: border-box;
        margin: 0;
    }

    #login-version {
        span {
            display: inline-block;
            font-size: 10px;
            text-decoration: none;
            color: $loginTextFaded;
            opacity: 0.7;
            a {
                color: $loginTextFaded !important;
            }
        }

        #dark-theme-button {
            width: 12px;
            //opacity: 0.5;
        }
        #dark-theme-button:hover {
            //opacity: 1;
        }

        #day-night-theme-button {
            width: 12px;
            //opacity: 0.5;
        }
        #day-night-theme-button:hover {
            //opacity: 1;
        }

        /*height: 27px;*/
        font-size: 9px;
        line-height: 14px;
    }

    #LoginForm_password, #LoginForm_username {
        border-radius: 2px;
    }

    #LoginForm_password, #LoginForm_username,
    #LoginForm_verifyCode, & > .row > .row {
        width: 267px;
    }


    & > .row { 
        & > input {
            margin-top: 0;  
        }
        & > .row {
            label {
                color: $loginText;
                font-weight: normal;
            }
            label, a {
                font-size: 9px;
            }
            label[for="LoginForm_password"],
            label[for="LoginForm_username"] {
                font-size: 13px;
                font-weight: bold;
                color: $loginBoldText
            }
            margin: auto;
            margin-bottom: 8px;
            button {
                height: 40px;
            }
        }
        .remember-me-row {
            width: 268px;
        }
        .login-links {
            width: 270px;
            margin-top: 12px;
            margin-bottom: 16px;
            .cell.google-login-cell {
                float: right;
            }
            .x2touch-cell {
                position: relative;
                left: -3px;
            }
        }
        .remember-me-row, .login-links {
            height: 20px;
        }
        .remember-me-row {
            height: 14px;
            margin-bottom: 0;
            [type="checkbox"] {
                margin-right: 2px;
            }
            .cell.need-help-cell {
                float: right;
            }
            .cell {
                height: 14px;
                line-height: 20px;
                label, a {
                    position: relative;
                    top: -3px;
                }
            }
            .remember-me-cell {
                text-align: center;
                margin: auto;
                font-size: 9px;
                & > span {
                    //font-size: 11px;
                }
            }
        }
    }


    input[type="text"], input[type="password"] {
        height: 40px;
    }

    .login-links, .remember-me-row, #login-version {
        a {
            //opacity: 0.90;
            &:hover {
                //opacity: 1;
            }
        }
    }

    a {
        &.alt-sign-in-link {
            text-decoration: none;
            color: #666;
            span {
                position: relative;
                top: -5px;
            }
        }
        &.google-sign-in-link {
            float: left;
            img {
                position: relative;
                top: 2px;
            }
            span {
                margin-left: 2px;
                top: -3px;
            }
        }
    }

    background: none;
    margin-bottom: 0;
    border: none;
    overflow: hidden;
    border: none;
    -moz-border-radius: 0;
    -o-border-radius: 0;
    -webkit-border-radius: 0;

    .cell.right {
        float: right;
        margin-right: 0;
        width: auto;
    }

    .row {
        overflow: visible;
    }

    input:focus {
        border-color: #aaa;
    }

    #google-icon {
        height: 16px;
        width: 16px;
    }

    #mobile-icon {
        height: 18px;
        width: 18px;
    }

    .row.theme-selection {
        width: 100%;
        a {
            font-size: 10px;
        }
        margin-top: 5px;
        span {
            border-radius: 2px;
            background: red;
            float: left;
            margin: 5px 9px 0px 0px;
            width: 20px;
            height: 20px;
            display: inline-block;
            cursor: pointer;
            &.switch {
                margin-right: 0;
                background: none;
                float: right;
                a {
                    text-decoration: none;
                    font-size: 20px;
                }
            }
            &:hover {
                opacity: 0.9;
            }
        }
    }

}


#signin-button {
    display: inline-block;
    box-sizing: border-box;
    width: 100%;
    //border-radius: 3px 0 0 3px;
    //width: 204px !important;
}


#mobile-signin-button {
    border-color: rgb(35, 61, 95);
    background: rgb(237, 237, 237) !important;
    width: 60px;
    display: inline-block;
    text-align: center;
    line-height: 15px;
    /* padding: 10px 25px; */
    box-sizing: border-box;
    border-radius: 0 3px 3px 0;
    font-size: 28px;
    padding: 0;
    margin-right: 0;
    color: black;
    margin-left: 0px;
    &:hover {
        background: lighten(rgb(237, 237, 237), 3%) !important;
    }
}

#login-form-logo {
    font-size: 86px;
    color: $defaultBgColor;
}

#custom-login-form-logo {
    margin: 15px 0 29px 0;
}

body.custom-background-image {
    div.background {
        background: rgb(45, 45, 45) !important;
        opacity: 0.7;
    }
}

#app-title {
    color: rgb(104, 104, 104);
    margin: 0;
    margin-bottom: 3px;
}

#app-description {
    margin: auto;
    margin-bottom: 15px;
}

.partner-logo-cell {
    margin: auto;
    height: 71px;
    width: 80px;
}

#login-x2engine {
    text-align: center;
    width: 382px;
    margin: auto;
    display: block;
    /*text-align:center;*/
    font-weight: bold;
    font-size: 10px;
    color: #999;
    text-decoration: none;
}

#login-x2engine-partner-content {
    text-align: center;
    width: 382px;
    margin: auto;
    display: block;
    /*text-align:center;*/
    font-weight: bold;
    font-size: 10px;
    color: #999;
    text-decoration: none;
    margin-top: 19px;
}

#x2-info, #x2-partner-info {
    width: 382px;
    margin-top: 12px;
}

#partner-login-info-how-to {
    padding-top: 8px;
    padding-bottom: 8px;
    clear: both;
}

#partner-login-logo {
    height: 71px;
    width: 80px;
}

.avatar-upload {
    -webkit-border-radius: 8px;
    -moz-border-radius: 8px;
    -o-border-radius: 8px;
    border-radius: 8px;
}

#full-name {
    color: $loginBoldText;
    font-weight: bold;
    font-size: 23px;
    margin-bottom: 8px;
}

#login-page.welcome-back-page {
    padding-top: 11px;
    #login-logo {
        margin-top: 11px;
    }
}

.company-logo-cell {
    margin: auto;
    height: 43px;
    width: 60px;
}

.avatar-cell {
    margin: auto;
    margin-bottom: 20px;
    text-align: center;

    .default-avatar {
        color: $lightGray;
        text-shadow: 0px -1px 1px rgba(black, 0.3), 
                     0px 1px 1px rgba(white, 0.3);
        /* @theme color dark_content */
    }
}

.image-alignment-helper {
    display: inline-block;
    height: 100%;
    vertical-align: middle;
}

#avatar-image {
    vertical-align: middle;
}

#login-title-container {
    text-align: center;
    margin: auto;
    margin-top: 16px;
    margin-bottom: 12px;
    h1 {
        font-size: 27px;
        -webkit-font-smoothing: antialiased;
    }
}

#login-page {
    width: 331px !important;
    border: 1px solid rgb(206, 206, 206);
    
    /*
    -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    */
    
    width: 360px;
    background: #F3F3F3;
    background: white;
    min-height: 0;
    padding: 8px 3px;
    position: relative;
    
    @include border-radius (6px);
}

#login-box {
    text-align: center;
}

#login-box-outer {
    z-index: 10000;
    /*top: 197px;*/
    width: 100%;
    min-width: 410px;
    min-height: 442px;
    margin: auto;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}

#password-reset-form-outer {
    z-index: 10000;
    /*top: 197px;*/
    width: 100%;
    min-width: 410px;
    min-height: 442px;
    margin: auto;
    > .container {
        padding: 35px 24px 57px 24px;
    }
    position: relative;
    margin-top: 20%;
}


/*#LoginForm_username,
#LoginForm_password {
        margin: 0;
}

#LoginForm_username {
        border-radius: 4px 4px 0 0 ;
        -moz-border-radius: 4px 4px 0 0;
        -webkit-border-radius: 4px 4px 0 0;
        -o-border-radius: 4px 4px 0 0;
        border-bottom: none;
}

#LoginForm_password {
        border-radius: 0 0 4px 4px ;
        -moz-border-radius: 0 0 4px 4px;
        -webkit-border-radius: 0 0 4px 4px;
        -o-border-radius: 0 0 4px 4px;
        margin-bottom: 13px;
}

#LoginForm_username.login-input-focus {
        border-bottom: 1px solid #aaa;
}

#LoginForm_username.login-input-focus + #LoginForm_password {
        border-top: none;
}*/

#LoginForm_username, #LoginForm_password, #LoginForm_verifyCode {
    color: #555555;
    font-size: 16px;
    line-height: 24px;
}

#signin-button {
    line-height: 15px;
    padding: 10px 25px;
    @include loginButtons;
    background: #a1a1a1 !important;
    border-color: #a1a1a1 !important;
    text-shadow: none !important;
}

#login-form a.alt-sign-in-link {
    &:hover {
        text-decoration: underline;
    }
    img {
    }
}

#login-x2engine {
    display: none;
    margin-top: 118px;
    height: 81px;
    &.with-partner-branding {
        margin-top: 10px;
    }
    a {
        color: #999;
        margin-top: 0;
        &:hover {
            text-decoration: underline;
        }
    }
}

.form-cell {
    margin: 0;
    width: 225px;
}

.captcha-row, .login-button-row {
    margin-top: 5px;
}

#remember-me-row {
    height: 30px;
    margin: auto;
    margin-top: 9px;
}

#login-form-inputs-container {
    width: 100%;
    text-align: center;
}

.login-links.right {
    float: right;
    text-align: center;
}

#captcha-container {
    text-align: center;
    margin-bottom: 5px;
}

#captcha-image {
    display: block;
    cursor: pointer;
    margin: auto;
}

#signin-button-container {
    text-align: center;
    margin: auto;
    #signin-button {
        float: left;
    }
    #mobile-signin-button {
        float: right;
    }
}

#signin-button {
    margin: auto;
    text-align: center;
    font-size: 19px;
    -webkit-font-smoothing: antialiased;
}

[for="LoginForm_rememberMe"] {
    display: inline-block !important;
}

#signin-button img {
    margin-right: 5px;
    margin-top: -2px;
    margin-left: -8px;
    height: 16px;
}

#body-tag .background {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    z-index: -10;
    background: #fefefe !important;

    .stripe-container {
        width: 650px;
        height: 100%;
        margin: auto;
    }
    
    .stripe {
        background: #a1a1a1;
        background: #f3f3f3;
        //opacity: 0.2;
        width: 275px;
        height: 100%;
        &.small {
            width: 8px;
            margin: 0px 8px;
        }
    }
}

/*
racing stripe
*/

body {
        background: url('../images/stripes_background.png') !important;
            background-position: center -550px !important;
            background-repeat: no-repeat !important;
    
}

#dark-theme-button {
    font-size: 10pt;
    text-decoration: none;
    position: relative;
    top: 1px;
    margin-right: 2px;
}

#day-night-theme-button {
    font-size: 10pt;
    text-decoration: none;
    position: relative;
    top: 1px;
    margin-left: 2px;
}

.x2-blue:hover {
    opacity: 0.95;
}

$widthThreshold: 657px;
@media (max-width: $widthThreshold) {
    #login-box-outer {
        top: 60px !important;
        bottom: 0;
    }
}

@media (max-height: 800px) and (min-width: $widthThreshold + 1) {
    #login-box-outer {
        top: 130px !important;
        bottom: 0;
    }
}
